﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Bymed.SpineScan.DataModel;
using Bymed.SpineScan.Repository.EntityFramework;
using Bymed.SpineScan.Repository.Interface;

namespace Bymed.SpineScan.UnitTest.FakeRepository
{
    public class FakeRepositoryFactory : IRepositoryFactory
    {
        public void OpenSessionWithTransaction() { }

        public void OpenSession() { }

        public void Rollback() { }

        public void Commit() { }

        public void Flush() { }

        public void CloseSession() { }

        public IRepository<T> CreateRepositoryBase<T>() where T : class
        {
            return new FakeRepositoryBase<T>();
        }

        /// <summary>
        /// Create an instance of DiagnosticMessageRepository to do any operation against data source.
        /// </summary>
        /// <returns>An instance of DiagnosticMessageRepository</returns>
        public IDiagnosticMessageReferenceRepository CreateDiagnosticMessageReferenceRepository()
        {
            return new FakeDiagnosticMessageRepository();
        }

        /// <summary>
        /// Create an instance of TestResultRepository to do any operation against data source.
        /// </summary>
        /// <returns>An instance of TestResultRepository</returns>
        public ITestResultRepository CreateTestResultRepository()
        {
            return new FakeTestResultRepository();
        }

        /// <summary>
        /// Create an instance of TestTrackingRepository to do any operation against data source.
        /// </summary>
        /// <returns>An instance of TestTrackingRepository</returns>
        public ITestTrackingRepository CreateTestTrackingRepository()
        {
            return new FakeTestTrackingRepository();
        }

        /// <summary>
        /// Create an instance of PatientRepository to do any operation against data source.
        /// </summary>
        /// <returns>An instance of PatientMessageRepository</returns>
        public IPatientRepository CreatePatientRepository()
        {
            return new FakePatientRepository();
        }

        public void Dispose() { }


        public ITestResultDiagnosticMessageRepository CreateTestResultDiagnosticMessageRepository()
        {
            throw new NotImplementedException();
        }


        public IAttendingDoctorRepository CreateAttendingDoctorRepository()
        {
            throw new NotImplementedException();
        }
    }
}
